import {baseRequest} from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/tjzy/pre/` + url, ...arg)
export default {
	prePage(data) {
		return request('pageList', data, 'post')
	},
	agentImportPre(data) {
		return request('agentImportExcel', data, 'post')
	},
	adminImportPre(data) {
		return request('adminImportExcel', data, 'post')
	},
	pageDetail(data) {
		return request('pageDetail', data, 'post')
	},
	startCallTask(batchNumber) {
		return request('startCallTask/' + batchNumber, '', 'get')
	},
	closeCallTask(batchNumber) {
		return request('closeCallTask/' + batchNumber, '', 'get')
	},
	continueCallTask(batchNumber) {
		return request('continueCallTask/' + batchNumber, '', 'get')
	},
	finishCallTask(batchNumber) {
		return request('finishCallTask/' + batchNumber, '', 'get')
	},
	//删除批次号
	// deleteOutCall(batchNumber) {
	// 	return request('deletePreOutCall/' + batchNumber, '', 'get')
	// },
	deleteOutCall(data) {
		return request('deletePreOutCall', data, 'post')
	},
	changeCallee(batchNumber, caller) {
		return request('changeCallee/' + batchNumber + '?caller=' + caller, '', 'get')
	},
	getPreCallBusinessById(id) {
		return request('getPreCallBusinessById/' + id, '', 'get')
	},
	copyPreOutCallDetail(data) {
		return request('copyPreOutCallDetail', data, 'post')
	},
	getCallCount(batchNumber, filterType) {
		return request('getCallCount/' + batchNumber + "?filterType=" + filterType, null, 'get')
	},
	closeErrorTask(taskId) {
		return request('closeErrorTask/' + taskId, null, 'get')
	}
}
